import request from '@/utils/request'



// 查询仓库信息列表
export function listInfo(query) {
  return request({
    url: '/store/warehouse/list',
    method: 'get',
    params: query
  })
}

// 查询仓库信息详细
export function getInfo(wid) {
  return request({
    url: '/store/warehouse/' + wid,
    method: 'get'
  })
}

// 新增仓库信息
export function addInfo(data) {
  return request({
    url: '/store/warehouse',
    method: 'post',
    data: data
  })
}

// 修改仓库信息
export function updateInfo(data) {
  return request({
    url: '/store/warehouse',
    method: 'put',
    data: data
  })
}

// 删除仓库信息
export function delInfo(wid) {
  return request({
    url: '/store/warehouse/' + wid,
    method: 'delete'
  })
}

// 导出仓库信息
export function exportInfo(query) {
  return request({
    url: '/store/warehouse/export',
    method: 'get',
    params: query
  })
}



export function provinceCode() {
  return request({
    url: '/store/warehouse/province',
    method: 'get',
    params: ""
  })
}



export function findByprovinceCode(provinceCode) {
  return request({
    method:"get",
    url:"/store/warehouse/city/" + provinceCode,
    params:""
  })
};

export function findBycityCode(cityCode) {
  return request({
    method:"get",
    url:"/store/warehouse/town/" + cityCode,
    params:""
  })
};

